﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Web/BizWeb.Master" AutoEventWireup="true" CodeBehind="DataInput.aspx.cs" Inherits="Slja.WEB.Finance.DataInput" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link type="text/css" rel="Stylesheet" href="/CSS/Default/biz.css" />
     <script type="text/javascript" src="/JS/Offen/public.js"></script>
  <script type="text/javascript" src="/js/jquery.js"></script>
  <style type="text/css" >
        .Freezing 
        { 
            position:relative; 
            table-layout:fixed;
            top:expression(this.offsetParent.scrollTop);   
            z-index: 10;
        } 
        .Freezing th{text-overflow:ellipsis;overflow:hidden;white-space: nowrap;padding:2px;}
        .gridContainer{width:100%;height:100%;}
        .gridContainer div {width:100%;height:100%;position:relative;overflow:auto;}
    </style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<h3 style="height:25px;margin:1px 1px;"><asp:Label runat="server" ID="lbTitle"></asp:Label></h3><span>请复制Excel表格内容(包括标题行),粘贴到此框:</span>
<asp:HiddenField runat="server" ID="hdfChecked" Value="0" />
<br />
<asp:TextBox runat="server" ID="tbxInput" TextMode="MultiLine"></asp:TextBox> <!--  onpaste="return onPasteData();" -->
<input type="button" id="btnCheckdata" value="检测数据" runat="server" class="btnblue1" />
<input type="button" id="btnSave" value="保存" runat="server" class="btnblue1" />

<asp:TextBox runat="server" ID="tbxShow" style="display:none" ></asp:TextBox>
<input type="button" id="btnBack" value="返回" onclick="window.location.href='DailyAccount.aspx';" class="btnblue1" />
<%--<asp:Button id="btnTest" Text="测试" runat="server" style="display:none;" />--%>
<div id="gridContainer" class="gridContainer">
    <asp:GridView ID="myGridView" runat="server" SkinID="GridViewAuto" EnableViewState="true">       
    </asp:GridView>
    <br />
</div> <script type="text/javascript">
           var tbl = $("#ctl00_ContentPlaceHolder1_myGridView");
      
        if (tbl.length > 0 && $("tr", tbl).length > 0) {
            var checkedStr = "," + $("#ctl00_ContentPlaceHolder1_tbxShow").val() + ",";
            var head = $("tr", tbl).eq(0);
            var firtr = $("tr", tbl).eq(1);
            var hths = $("th", head);
            var ftds = $("td", firtr);
            for (var i = 0; i < hths.length; i++) {
                var colname = $("th", head).eq(i).html(); 
                if (colname!= "" && checkedStr.indexOf(colname) > -1) {
                    $("#chx" + i, ftds[i]).attr("checked", true);
                }
            }
        }

    </script>
</asp:Content>
